﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO;
namespace CricketHub
{
    public partial class Livescore : PhoneApplicationPage
    {
        LiveScore_req obj = new LiveScore_req();
        public Livescore()
        {
            InitializeComponent();
            pgbar.Visibility = Visibility.Visible;
          //  Score_details();
            obj.htt = this;
            obj.htm();

        }
      /*  HttpWebRequest reqest;
        private void Score_details()
        {
             reqest = (HttpWebRequest)WebRequest.Create("http://livechat.rediff.com/sports/score/score.txt");
            IAsyncResult result = (IAsyncResult)reqest.BeginGetResponse(new AsyncCallback(Resp), this);
 
        }
        private void Resp(IAsyncResult asyn)
        {
            HttpWebRequest req = reqest;
            HttpWebResponse response = (HttpWebResponse)req.EndGetResponse(asyn);
            Stream strea = response.GetResponseStream();
            StreamReader reader = new StreamReader(strea);
            string live = reader.ReadToEnd();


 
        }*/
        public void Browser_data(string browsercontent)
        {
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
               // webBrowser1.FontSize = 30;
                
                webBrowser1.NavigateToString(browsercontent);
                pgbar.Visibility = Visibility.Collapsed;
            });
            System.Diagnostics.Debug.WriteLine(browsercontent);


        }


    }
}